<template>
  <el-drawer title="作业详情" custom-class="paper-drawer" :visible="open" direction="rtl" :size="1600" append-to-body @close="onClose">
    <div class="drawer-body">
      <div class="row">
        <div class="left-col">
          <div class="card">
            <single-choice :i="1" />
            <multi-choice :i="2" @change="handleScoreChange" />
            <completion :i="3" @change="handleScoreChange" />
            <judge :i="4" />
            <short-answer :i="5" @change="handleScoreChange" />
          </div>
        </div>
        <div class="right-col">
          <div class="card">fsdalfjsdaklfjsldaflsafdsa</div>
        </div>
      </div>
    </div>
    <div class="drawer-footer">
      <el-button @click="onClose">关 闭</el-button>
    </div>
  </el-drawer>
</template>

<script>
import SingleChoice from '../question/singleChoice.vue';
import MultiChoice from '../question/multiChoice.vue';
import Completion from '../question/completion.vue';
import Judge from '../question/judge.vue';
import ShortAnswer from '../question/shortAnswer.vue';

export default {
  name: "PaperDetailDrawer",
  components: { SingleChoice, MultiChoice, Completion, Judge, ShortAnswer },
  props: {
    open: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {}
  },
  methods: {
    handleScoreChange(val) {
      console.log('得分：', val);
    },
    onClose() {
      this.questionForm = {};
      this.secondLevelTypeOps = [];
      this.$emit('update:open', false);
    },
    onSave() {
      console.log('提交数据');
      this.onClose();
    },
  }
}
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>

